package _17作业.t3;

import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

public class Demo1 {
    public static void main(String[] args) {
        Set<String> strings = new HashSet<>();
        strings.add("刘备");
        strings.add("关羽");
        strings.add("张飞");
        strings.add("刘备");
        strings.add("张飞");

        System.out.println(strings.size());

        Iterator<String> i = strings.iterator();

        while (i.hasNext()){
            System.out.println(i.next());

        }

        for (String s :strings){
            System.out.println(s);
        }
    }
}
